Skip to content

[25944] Normalize config schema path to build with Ninja - #556

Open
Danipiza wants to merge 2 commits into
mainfrom
feature/downstream-ci
Open

Danipiza wants to merge 2 commits into
mainfrom
feature/downstream-ci

Conversation

@Danipiza

@Danipiza Danipiza commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

Two fixes needed to build and test DDS Router in the DDS Pipe Pro Windows downstream CI, which runs on self-hosted runners and uses Ninja for ccache.

1. Normalize the config schema path to build with Ninja

ddsrouter_yaml registers its config schema as a configure dependency as ${PROJECT_SOURCE_DIR}/../resources/configurations/ddsrouter_config_schema.json. The configure_file() in the YAML validator tests registers the same file again, under its normalized path. Ninja collapses the .. and rejects the duplicate when loading build.ninja:

ninja: error: build.ninja:1601: multiple rules generate .../resources/configurations/ddsrouter_config_schema.json

The path is now normalized with get_filename_component(... ABSOLUTE), as DDS Record & Replay already does in ddsrecorder_yaml.

2. Run the Windows tool tests without Start-Process

On the self-hosted Windows runners, all 4 tool.application.ddsrouter.* tests failed before starting anything:

Start-Process : This command cannot be run due to the error: An attempt was made to reference a token that does not exist.

The runners most likely run as a Windows service, with no logged-in user session, and Start-Process -WindowStyle Hidden needs one. GitHub-hosted runners have that session, which is why it passes there.

The launcher still runs the test in a separate hidden console. tests.py sends CTRL_C_EVENT, which reaches every process attached to the same console, so the test must not share CTest's console. That console is now created by a small Python wrapper using subprocess with CREATE_NEW_CONSOLE, which calls CreateProcess directly and doesn't need a user session. The launcher also now reports the configuration file in its error message. The old message used $test_name, which was never set.

This aligns the launcher with Fast DDS Spy's (fastddsspy_tool/test/application/launcher.ps1): neither uses Start-Process any more, so both work on runners without a user session. They still differ in one point. Fast DDS Spy runs Python directly in CTest's console, which works because its tests stop the tool through its input and never send a signal. DDS Router keeps the separate console because its tests check shutdown on Ctrl+C.

Tested

  • Ninja fix, locally (Linux, CMake 3.28, Ninja 1.11): before the change, ddsrouter_yaml with BUILD_TESTS=ON fails at the error above. After it, the package configures, builds and passes its tests (38/38).
  • Launcher: the Python wrapper was checked locally with the Windows API stubbed: it forwards the arguments, requests a new hidden console and returns the test's exit code. It has not run on Windows yet.

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza changed the title [FIX] Normalize config schema path to build with Ninja [25944] Normalize config schema path to build with Ninja Nov 30, 2026
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 32.29%. Comparing base (4932234) to head (0818a47).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #556   +/-   ##
=======================================
  Coverage   32.29%   32.29%           
=======================================
  Files          16       16           
  Lines         576      576           
  Branches      307      307           
=======================================
  Hits          186      186           
  Misses        191      191           
  Partials      199      199           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch was successfully deployed

1 active deployment
codecov — 0818a47f Deployed Nov 30, 2026 by Danipiza via reusable_tests / coverage #3905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant